<template>
  <div class="table-head">
    <a-card :bordered="false" :header-style="{ padding: '0 12px' }">
      <template #title> {{ t["变价记录"] }} </template>
      <div class="flex justify-between">
        <div class="flex w-fit gap-4">
          <a-input
            v-model="query.goodsName"
            allow-clear
            :placeholder="t['请输入商品名称']"
            class="w-fit"
            @clear="search"
            @keydown.enter="search"
          />
          <a-button @click="search"> {{ t["刷新"] }}</a-button>
          <a-button type="primary" @click="search"> {{ t["查询"] }}</a-button>
        </div>

        <ExportButton @change="exportFile" />
      </div>
    </a-card>
  </div>
</template>

<script setup lang="ts">
import { goodsRecordExport } from "@/api/service/goods/goods";
import { ITime } from "@/data/options/selection";
import { search } from "../../data/curd";
import { query } from "../../data/table";

const t = translate("公共模块");

const exportFile = (data: ITime) => {
  goodsRecordExport(data);
};
</script>

<style lang="scss" scoped>
:deep(.arco-card-header) {
  border: none;
}
</style>
